#pragma once 

#define _TIME_UPDATE 0

#define _GSTATE_MENU 0
#define _GSTATE_RUN 1
#define _GSTATE_RUN_PAUSE 0
#define _GSTATE_RUN_PLAY 1

#define _IMG_BGR_MENU			    L"Resources/Menu/title-screen-main.png"
#define _IMG_BGR_RUN				L"Resources/Run/background.png"
#define _IMG_BGR_MENU_PUSHKEY		L"Resources/Menu/push-key.png"
#define _IMG_LEVEL1_DEMO			L"Resources/Run/demo-level1.png"
// Contra IMG
#define _IMG_CONTRA_LEG_STAND_RIGHT  			L"Resources/Player/contra_leg_stand_right.png"
#define _IMG_CONTRA_LEG_STAND_LEFT   			L"Resources/Player/contra_leg_stand_left.png"
#define _IMG_CONTRA_LEG_MOVE_RIGHT  			L"Resources/Player/contra_leg_move_right.png"
#define _IMG_CONTRA_LEG_MOVE_LEFT  				L"Resources/Player/contra_leg_move_left.png"
#define _IMG_CONTRA_LEG_SIT_LEFT	 			L"Resources/Player/contra_leg_sit_left.png"
#define _IMG_CONTRA_LEG_SIT_RIGHT		  		L"Resources/Player/contra_leg_sit_right.png"
#define _IMG_CONTRA_LEG_FLY_LEFT  				L"Resources/Player/contra_leg_fly_left.png"
#define _IMG_CONTRA_LEG_FLY_RIGHT  				L"Resources/Player/contra_leg_fly_right.png"
#define _IMG_CONTRA_BODY_MOVE_LEFT  			L"Resources/Player/contra_body_move_left.png"
#define _IMG_CONTRA_BODY_MOVE_RIGHT  			L"Resources/Player/contra_body_move_right.png"
#define _IMG_CONTRA_BODY_FIRE_LEFT  		    L"Resources/Player/contra_body_fire_left.png"
#define _IMG_CONTRA_BODY_FIRE_UP_LEFT  		    L"Resources/Player/contra_body_fire_up_left.png"
#define _IMG_CONTRA_BODY_UP_LEFT  				L"Resources/Player/contra_body_up_left.png"
#define _IMG_CONTRA_BODY_UP_CROSS_LEFT  		L"Resources/Player/contra_body_up_cross_left.png"
#define _IMG_CONTRA_BODY_FIRE_UP_CROSS_LEFT  	L"Resources/Player/contra_body_fire_up_cross_left.png"
#define _IMG_CONTRA_BODY_DOWN_CROSS_LEFT  		L"Resources/Player/contra_body_down_cross_left.png"
#define _IMG_CONTRA_BODY_FIRE_DOWN_CROSS_LEFT  	L"Resources/Player/contra_body_fire_down_cross_left.png"
#define _IMG_CONTRA_BODY_STAND_LEFT  		    L"Resources/Player/contra_body_stand_left.png"
#define _IMG_CONTRA_BODY_FLY_LEFT  				L"Resources/Player/contra_body_fly_left.png"
#define _IMG_CONTRA_BODY_FIRE_RIGHT  		    L"Resources/Player/contra_body_fire_right.png"
#define _IMG_CONTRA_BODY_FIRE_UP_RIGHT 		    L"Resources/Player/contra_body_fire_up_right.png"
#define _IMG_CONTRA_BODY_UP_RIGHT 				L"Resources/Player/contra_body_up_right.png"
#define _IMG_CONTRA_BODY_UP_CROSS_RIGHT 		L"Resources/Player/contra_body_up_cross_right.png"
#define _IMG_CONTRA_BODY_FIRE_UP_CROSS_RIGHT 	L"Resources/Player/contra_body_fire_up_cross_right.png"
#define _IMG_CONTRA_BODY_DOWN_CROSS_RIGHT 		L"Resources/Player/contra_body_down_cross_right.png"
#define _IMG_CONTRA_BODY_FIRE_DOWN_CROSS_RIGHT  L"Resources/Player/contra_body_fire_down_cross_right.png"
#define _IMG_CONTRA_BODY_STAND_RIGHT  		    L"Resources/Player/contra_body_stand_right.png"
#define _IMG_CONTRA_BODY_FLY_RIGHT  		    L"Resources/Player/contra_body_fly_right.png"
//#define _IMG_CONTRA_SIT_FIRE_LEFT	 			L"Resources/Player/contra_sit_fire_left.png"
//#define _IMG_CONTRA_SIT_FIRE_RIGHT		  		L"Resources/Player/contra_sit_fire_right.png"
#define _IMG_CONTRA_BODY_SIT_LEFT	 			L"Resources/Player/contra_body_sit_left.png"
#define _IMG_CONTRA_BODY_FIRE_SIT_LEFT	 		L"Resources/Player/contra_body_fire_sit_left.png"
#define _IMG_CONTRA_LEG_FIRE_SIT_LEFT	 		L"Resources/Player/contra_leg_fire_sit_left.png"
#define _IMG_CONTRA_BODY_FIRE_SIT_RIGHT	 		L"Resources/Player/contra_body_fire_sit_right.png"
#define _IMG_CONTRA_LEG_FIRE_SIT_RIGHT	 		L"Resources/Player/contra_leg_fire_sit_right.png"
#define _IMG_CONTRA_BODY_SIT_RIGHT		  		L"Resources/Player/contra_body_sit_right.png"

#define _IMG_CONTRA_BODY_SWIM_LEFT		  		L"Resources/Player/contra_swim_left.png"
#define _IMG_CONTRA_BODY_SWIM_RIGHT		  		L"Resources/Player/contra_swim_right.png"
#define _IMG_CONTRA_BODY_SWIM_LEFT_FIRE	  		L"Resources/Player/contra_swim_left_fire.png"
#define _IMG_CONTRA_BODY_SWIM_RIGHT_FIRE	  	L"Resources/Player/contra_swim_right_fire.png"
#define _IMG_CONTRA_BODY_SWIM_DOWN			  	L"Resources/Player/contra_swim_down.png"
#define _IMG_CONTRA_BODY_SWIM_FIRE_UP_LEFT	  	L"Resources/Player/contra_swim_fire_up_left.png"
#define _IMG_CONTRA_BODY_SWIM_FIRE_UP_RIGHT	  	L"Resources/Player/contra_swim_fire_up_right.png"
#define _IMG_CONTRA_BODY_SWIM_FIRE_CROSS_LEFT  	L"Resources/Player/contra_swim_fire_cross_left.png"
#define _IMG_CONTRA_BODY_SWIM_FIRE_CROSS_RIGHT 	L"Resources/Player/contra_swim_fire_cross_right.png"
#define _IMG_CONTRA_DEAD					 	L"Resources/Player/contra_dead.png"

#define _IMG_ICON_LIFE							L"Resources/Player/life_icon.png"

// Army
#define _IMG_ARMY_GUN_1_BEFORE L"Resources/Army/gun_1_before.png"
#define _IMG_ARMY_GUN_1 L"Resources/Army/gun_1.png"
#define _IMG_ARMY_GUN_2 L"Resources/Army/gun_2.png"
#define _IMG_ARMY_GUN_1_EFFECT L"Resources/Army/gun_1_effect.png"
#define _IMG_ARMY_RED_SOLDIER L"Resources/Army/red_soldier.png"
#define _IMG_ARMY_RED_HIDDEN L"Resources/Army/red_hidden.png"
#define _IMG_ARMY_RUNNING_SOLDIER L"Resources/Army/running_soldier.png"

#define _IMG_ARMY_BOSS_TOP_LEFT_1 L"Resources/Map/Stage1/Image_State1_Boss_Gun_Top_Left.png"
#define _IMG_ARMY_BOSS_TOP_RIGHT_1 L"Resources/Map/Stage1/Image_State1_Boss_Gun_Top_Right.png"
#define _IMG_ARMY_BOSS_BOTTOM_1 L"Resources/Map/Stage1/Image_State1_Boss_Gun_Bottom.png"

#define _IMG_ARMY_BOSS_2							L"Resources/Map/Stage2/Emage_Map2_Boss.png"
#define _IMG_ARMY_BOSS_ITEM_TOP_2					L"Resources/Map/Stage2/Emage_Map2_Boss_Item_Top.png"
#define _IMG_ARMY_BOSS_ITEM_2						L"Resources/Map/Stage2/Emage_Map2_Boss_Items.png"

// Image 
#define _IMG_ITEM_1 L"Resources/Asset/item.png"
#define _IMG_ITEM_BLOCK L"Resources/Asset/item_block.png"

// Obstruction ImageS
#define _IMG_MAP_STAGE1_GRASS_1					L"Resources/Map/Stage1/map_stage1_grass_1.png"
#define _IMG_MAP_STAGE1_WATER_1					L"Resources/Map/Stage1/map_stage1_water_1.png"
#define _IMG_MAP_STAGE1_BRIDGE_1				L"Resources/Map/Stage1/Image_State1_Bridge_Fire.png"
#define _IMG_MAP_STAGE1_BRIDGE_LEFT_1				L"Resources/Map/Stage1/Image_State1_Bridge_Left_1.png"
#define _IMG_MAP_STAGE1_BRIDGE_CENTER_1				L"Resources/Map/Stage1/Image_State1_Bridge_Center_1.png"
#define _IMG_MAP_STAGE1_BRIDGE_RIGHT_1				L"Resources/Map/Stage1/Image_State1_Right_1.png"

#define _IMG_MAP_STAGE2_STONE_1					L"Resources/Map/Stage2/Emage_Map2_Stone.png"
#define _IMG_MAP_STAGE2_BOAT_1					L"Resources/Map/Stage2/Emage_Map2_boat.png"
#define _IMG_MAP_STAGE2_BRIDGE_1					L"Resources/Map/Stage2/Emage_Map2_Bridge.png"
#define _IMG_MAP_STAGE2_WATER_ENEMY_1					L"Resources/Map/Stage2/Emage_Map2_Water_Enemy.png"
#define _IMG_MAP_STAGE2_WATER_ENEMY_2					L"Resources/Map/Stage2/Emage_Map2_Water_Enemy_Shoot.png"
#define _IMG_MAP_STAGE2_FIRE					L"Resources/Map/Stage2/Emage_Map2_Fire.png"


#define _IMG_MAP_STAGE3_GUN_ENEMY_1					L"Resources/Map/Stage3/Emage_Map3_Gun_Enemy.png"
#define _IMG_MAP_STAGE3_TANK_1					L"Resources/Map/Stage3/Emage_Map3_Tank.png"
#define _IMG_MAP_STAGE3_BOOM_1					L"Resources/Map/Stage3/Emage_Map3_Boom.png"
#define _IMG_MAP_STAGE3_BOSS_1					L"Resources/Map/Stage3/Emage_Map3_Boss.png"
#define _IMG_MAP_STAGE3_BOSS_ITEM_1					L"Resources/Map/Stage3/Emage_Map3_Boss_Item.png"
#define _IMG_MAP_STAGE3_BOSS_DOOR_1					L"Resources/Map/Stage3/Emage_Map3_Boss_Door.png"



//Effects
#define _IMG_MAP_STAGE1_BRIDGE_FIER_1				L"Resources/Map/Stage1/Image_State1_Bridge_Fire.png"
#define _IMG_MAP_STAGE1_EFFECT_OBJECT_BURNING_1		L"Resources/Map/Stage1/Image_State1_Effect_Object_burning.png"
#define _IMG_MAP_STAGE1_EFFECT_OBJECT_FIRE_1		L"Resources/Map/Stage1/Image_State1_Effect_Object_Fire.png"
#define _IMG_MAP_STAGE1_EFFECT_BULLET_SMALL_FIRE_1		L"Resources/Map/Stage1/Image_State1_Effect_Bullet_burning_Small.png"
#define _IMG_MAP_STAGE1_EFFECT_BULLET_BIG_FIRE_1		L"Resources/Map/Stage1/Image_State1_Effect_Bullet_burning_Big.png"
#define _IMG_MAP_STAGE1_EFFECT_WATER_FALL_1				L"Resources/Map/Stage1/Image_State1_Effect_Bullet_burning_Big.png"

// Background tiles
#define _IMG_MAP_STAGE1_BGR_TILES				L"Resources/Map/Stage1/tiles.png"
#define _IMG_MAP_STAGE2_BGR_TILES				L"Resources/Map/Stage2/tiles.png"
#define _IMG_MAP_STAGE3_BGR_TILES				L"Resources/Map/Stage3/tiles.png"

#define _IMG_MAP_STAGE1_BGR_TILES_SPRITE		L".//Resources//map_1_sprite.png"
#define _IMG_MAP_STAGE2_BGR_TILES_SPRITE		L".//Resources//map_2_sprite.png"
#define _IMG_MAP_STAGE3_BGR_TILES_SPRITE		L".//Resources//map_3_sprite.png"

// Bullet images	
#define _IMG_BULLET_LEVEL_1						L"Resources/Asset/bullet_level_1.png"
#define _IMG_BULLET_LEVEL_0						L"Resources/Asset/bullet_level_0.png"
#define _IMG_BULLET_LEVEL_2						L"Resources/Asset/bullet_level_2.png"
#define _IMG_BULLET_LEVEL_3						L"Resources/Asset/bullet_level_3.png"
#define _IMG_BULLET_TANK						L"Resources/Asset/bullet_tank.png"
#define _IMG_BULLET_BOSS_1						L"Resources/Asset/bullet_boss_1.png"

//Map file
#define _FILE_MAP_TILE_1						L".//Resources//map_1.txt"
#define _FILE_MAP_TILE_2						L".//Resources//map_2.txt"
#define _FILE_MAP_TILE_3						L".//Resources//map_3.txt"

#define _FILE_MAP_TILE_1_SPRITE					L".//Resources//map_1_sprite.txt"
#define _FILE_MAP_TILE_2_SPRITE					L".//Resources//map_2_sprite.txt"

# define M_PIl          3.141592653589793238462643383279502884L

#define _ID_MENU					0
#define _MENU_PUSHKEY			1
// Contra id
#define _ID_CONTRA 1
#define _ID_CONTRA_LEG_STAND_RIGHT				20
#define _ID_CONTRA_LEG_STAND_LEFT				21
#define _ID_CONTRA_LEG_MOVE_RIGHT				22
#define _ID_CONTRA_LEG_MOVE_LEFT				23
#define _ID_CONTRA_BODY_MOVE_LEFT				24
#define _ID_CONTRA_BODY_MOVE_RIGHT				25
#define _ID_CONTRA_BODY_FIRE_LEFT				26
#define _ID_CONTRA_BODY_STAND_LEFT				27
#define _ID_CONTRA_BODY_FIRE_RIGHT				28
#define _ID_CONTRA_BODY_STAND_RIGHT				29
#define _ID_CONTRA_BODY_FIRE_UP_LEFT			30
#define _ID_CONTRA_BODY_FIRE_UP_RIGHT			31
#define _ID_CONTRA_BODY_UP_LEFT					32
#define _ID_CONTRA_BODY_UP_RIGHT				33
#define _ID_CONTRA_BODY_UP_CROSS_LEFT			34
#define _ID_CONTRA_BODY_UP_CROSS_RIGHT			35
#define _ID_CONTRA_LEG_SIT_LEFT	 				36
#define _ID_CONTRA_LEG_SIT_RIGHT		  		37 
#define _ID_CONTRA_BODY_SIT_LEFT	 			38
#define _ID_CONTRA_BODY_SIT_RIGHT		  		39 
#define _ID_CONTRA_BODY_DOWN_CROSS_LEFT			40
#define _ID_CONTRA_BODY_DOWN_CROSS_RIGHT		41
#define _ID_CONTRA_BODY_FLY_RIGHT		  		42
#define _ID_CONTRA_BODY_FLY_LEFT		  		43 
#define _ID_CONTRA_LEG_FLY_RIGHT		  		44
#define _ID_CONTRA_LEG_FLY_LEFT		  			45
#define _ID_CONTRA_BODY_FIRE_DOWN_CROSS_RIGHT   46
#define _ID_CONTRA_BODY_FIRE_DOWN_CROSS_LEFT    47
#define _ID_CONTRA_BODY_FIRE_UP_CROSS_RIGHT     48
#define _ID_CONTRA_BODY_FIRE_UP_CROSS_LEFT      49
#define _ID_CONTRA_BODY_FIRE_SIT_LEFT	 		50
#define _ID_CONTRA_LEG_FIRE_SIT_LEFT	        51
#define _ID_CONTRA_BODY_FIRE_SIT_RIGHT	 		52
#define _ID_CONTRA_LEG_FIRE_SIT_RIGHT	        53
#define _ID_CONTRA_BODY_SWIM_LEFT		 		54
#define _ID_CONTRA_BODY_SWIM_RIGHT				55
#define _ID_CONTRA_BODY_SWIM_LEFT_FIRE	 		56
#define _ID_CONTRA_BODY_SWIM_RIGHT_FIRE			57
#define _ID_ICON_LIFE							58
#define _ID_CONTRA_BODY_SWIM_DOWN				59
#define _ID_CONTRA_BODY_SWIM_FIRE_UP_LEFT		60
#define _ID_CONTRA_BODY_SWIM_FIRE_UP_RIGHT		61
#define _ID_CONTRA_BODY_SWIM_FIRE_CROSS_LEFT	62
#define _ID_CONTRA_BODY_SWIM_FIRE_CROSS_RIGHT	63
#define _ID_CONTRA_DEAD							64
//#define _ID_CONTRA_SIT_FIRE_LEFT	 			38	
//#define _ID_CONTRA_SIT_FIRE_RIGHT		  		39

// Obstruction id
#define _ID_MAP_STAGE1_GRASS_1					100	
#define _ID_MAP_STAGE1_WATER_1					101
#define _ID_MAP_STAGE1_BRIDGE_1					102
#define _ID_MAP_STAGE1_BRIDGE_LEFT_1			103
#define _ID_MAP_STAGE1_BRIDGE_CENTER_1			104
#define _ID_MAP_STAGE1_BRIDGE_RIGHT_1			105

#define _ID_MAP_STAGE2_STONE_1					107
#define _ID_MAP_STAGE2_BOAT_1					108
#define _ID_MAP_STAGE2_BRIDGE_1					109
#define _ID_MAP_STAGE2_WATER_ENEMY_1			110
#define _ID_MAP_STAGE2_WATER_ENEMY_2			115
#define _ID_MAP_STAGE2_FIRE						114

#define _ID_MAP_STAGE3_GUN_ENEMY_1				111
#define _ID_MAP_STAGE3_TANK_1					112
#define _ID_MAP_STAGE3_BOOM_1					113

//Effect id
#define _ID_MAP_STAGE1_BRIDGE_FIER_1			106
#define _ID_MAP_STAGE1_OBJECT_BURNING_1			600
#define _ID_MAP_STAGE1_OBJECT_FIRE_1			601
#define _ID_MAP_STAGE1_EFFECT_BULLET_SMALL_FIRE_1	602
#define _ID_MAP_STAGE1_EFFECT_BULLET_BIG_FIRE_1		603
#define _ID_MAP_STAGE1_EFFECT_WATER_FALL_1			604

#define _ID_MAP_STAGE1_BGR_TILES				300
#define _ID_MAP_STAGE2_BGR_TILES				301
#define _ID_MAP_STAGE3_BGR_TILES				302
#define _ID_MAP_STAGE3_BOSS_1					304
#define _ID_MAP_STAGE3_BOSS_ITEM_1				305
#define _ID_MAP_STAGE1_BGR_TILES_SPRITE			303
#define _ID_MAP_STAGE2_BGR_TILES_SPRITE			306
#define _ID_MAP_STAGE3_BGR_TILES_SPRITE			307
// Bullet id
#define _ID_BULLET_LEVEL_0						200
#define _ID_BULLET_LEVEL_1						201
#define _ID_BULLET_LEVEL_2						202
#define _ID_BULLET_LEVEL_3						203
#define _ID_BULLET_WATER_ARMY					204
#define _ID_BULLET_BOSS_1						1000
#define _ID_BULLET_TANK							205
#define _ID_BULLET_BOSS_3						206

// Army 
#define _ID_ARMY_GUN_1_BEFORE 398
#define _ID_ARMY_GUN_1_EFFECT 399
#define _ID_ARMY_GUN_1 400
#define _ID_ARMY_RED_SOLDIER 401
#define _ID_ARMY_RUNNING_SOLDIER 402
#define _ID_ARMY_BOSS_TOP_LEFT_1 403
#define _ID_ARMY_BOSS_TOP_RIGHT_1 404
#define _ID_ARMY_BOSS_BOTTOM_1 405
#define _ID_ARMY_BOSS_2 406
#define _ID_ARMY_GUN_2 407


#define _ID_ARMY_BOSS_ITEM_2 408
#define _ID_ARMY_BOSS_ITEM_TOP_2 409
#define _ID_ARMY_RED_HIDDEN 410
#define _ID_ARMY_BOSS_1 412
#define _ID_MAP_STAGE3_BOSS_DOOR_1 411



// Item
#define _ID_ITEM_PACKAGE 499
#define _ID_ITEM_BLOCK 500
#define _ID_ITEM_M 501
#define _ID_ITEM_B 502
#define _ID_ITEM_F 503
#define _ID_ITEM_S 504
#define _ID_ITEM_L 505
#define _ID_ITEM_R 506
#define _ID_ITEM_1 507



#define _LEVEL1_DEMO			100
#define _NONE_ -1

#define _ACTION_GO_UP 1
#define _ACTION_LAND_UPPER 2
#define _ACTION_GO_UP_NONE 3

#define ENTITIES map<int, AbstractEntity*>
#define SPRITES map<int, Sprite*>
#define VEC_INT std::vector<int>

// object type
#define _TYPE_CONTRA 1

// object obstruction
#define _TYPE_OBS_GRASS_1 10
#define _TYPE_OBS_WATER_1 11
#define _TYPE_OBS_BRIDGE_LEFT_1 12
#define _TYPE_OBS_BRIDGE_CENTER_1 13
#define _TYPE_OBS_BRIDGE_RIGHT_1 14

#define _TYPE_OBS_STONE_1 15
#define _TYPE_OBS_BOAT_1 16
#define _TYPE_OBS_BRIDGE_2 17

// Army constant to manage army of game: player and monster
#define _ARMY_PLAYER 1
#define _ARMY_MONSTER 2



#define _SOUND_PLAYER_SINGLE_SHOOTING			L"Resources/Sounds/ContraSFX_SINGLE_SHOOTING.wav"
#define _SOUND_GAME_BOSS_APPEAR				L"Resources/Sounds/ContraSFX_BOSS_APPEAR.wav"
#define _SOUND_GAME_BRIDGE_FIRE				L"Resources/Sounds/ContraSFX_BRIDGE_FIRE.wav"
#define _SOUND_GAME_BULET_M_SHOOTING		L"Resources/Sounds/ContraSFX_BULET_M_SHOOTING.wav"
#define _SOUND_GAME_ENEMY_DIED		L"Resources/Sounds/ContraSFX_ENEMY_DIED.wav"
#define _SOUND_PLAYER_MULTI_SHOOTING		L"Resources/Sounds/ContraSFX_MULTI_SHOOTING.wav"
#define _SOUND_PLAYER_JUMP_IN_LAND		L"Resources/Sounds/ContraSFX_PLAYER_JUMP_IN_LAND.wav"
#define _SOUND_PLAYER_SHOOT_IN_GUN_ENEMY		L"Resources/Sounds/ContraSFX_PLAYER_SHOOT_IN_GUN_ENEMY.wav"
#define _SOUND_GAME_SOUND		L"Resources/Sounds/ContraSFX_GAME_SOUND.wav"
#define _SOUND_SUPPER_BOSS_FIRE		L"Resources/Sounds/ContraSFX_SUPPER_BOSS_FIRE.wav"


#define _ID_SOUND_PLAYER_SINGLE_SHOOTING		6000
#define _ID_SOUND_GAME_BOSS_APPEAR				6001
#define _ID_SOUND_GAME_BRIDGE_FIRE				6002
#define _ID_SOUND_GAME_BULET_M_SHOOTING			6003
#define _ID_SOUND_GAME_ENEMY_DIED				6004
#define _ID_SOUND_PLAYER_MULTI_SHOOTING			6005
#define _ID_SOUND_PLAYER_JUMP_IN_LAND			6007
#define _ID_SOUND_PLAYER_SHOOT_IN_GUN_ENEMY		6008
#define _ID_SOUND_GAME_SOUND					6009
#define _ID_SOUND_SUPPER_BOSS_FIRE				6010

